-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: improve misleading warning for progress callback exceptions #775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: improve misleading warning for progress callback exceptions #775
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for working on this!
There are some suggestion would be good to address before merging:
- please can you add tests
- replace use of try-except-else to make it consistent in the project
Hi @ihrpr thank you for the review. I'll add the tests. |
Hi @ihrpr, ready for another pass! |
Why is it misleading? Do you have a MRE that I can check this locally? Also, if this makes sense, we should except on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding tests! Few things to address - please see comments in PR
- As Kludex pointed out, the PR catches
Exception
which is too broad. - The warning could include more context about which progress token/request triggered the exception.
Thank you for your reviews and comments @Kludex and @ihrpr! @Kludex the "misleading" part is that it prints |
Currently if the progress notification callback throws an exception we get a misleading warning message.
This PR aims to fix it.
Motivation and Context
How Has This Been Tested?
Ran a few tests locally.
Breaking Changes
No breaking changes.
Types of changes
Checklist
Additional context